﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class Index_2 : System.Web.UI.MasterPage
{
    MenuController menuControl;
    DataTable dtMenu;

    public List<Menu> listMenu = new List<Menu>();
    protected void Page_Load(object sender, EventArgs e)
    {
        menuControl = new MenuController();

        dtMenu = menuControl.getAllMenu();

        loadMenu();
    }

    public void loadMenu() {
        foreach (DataRow item in dtMenu.Rows)
        {
            listMenu.Add(new Menu(item));
        }
    }
}
